<template>
  <!-- 操作 -->
  <div class="grid-content">
    <span v-html="svgImg.delete" @click="handleDelete" class="iconfont"></span>
  </div>
</template>

<script>
export default {
  props: {
    tableData: Array,
    itemIndex: Number,
  },
  data() {
    return {
      svgImg: this.$svgImg,
    };
  },
  methods: {
    handleDelete() {
      if (this.tableData.length <= 1) {
        return;
      }
      this.tableData.splice(this.itemIndex, 1);
    },
  },
};
</script>

<style scoped>
</style>